import request from '@/config/axios'

// 用户楼盘咨询 VO
export interface UserBuildingConsultVO {
  id: number // 主键
  userId: number // 用户ID
  followId: number // 楼盘ID
  type: boolean // 关注的类型（0公寓 1现房 2建房）
  name: string // 姓名
  mobile: string // 手机号
}

// 用户楼盘咨询 API
export const UserBuildingConsultApi = {
  // 查询用户楼盘咨询分页
  getUserBuildingConsultPage: async (params: any) => {
    return await request.get({ url: `/business/user-building-consult/page`, params })
  },

  // 查询用户楼盘咨询详情
  getUserBuildingConsult: async (id: number) => {
    return await request.get({ url: `/business/user-building-consult/get?id=` + id })
  },

  // 新增用户楼盘咨询
  createUserBuildingConsult: async (data: UserBuildingConsultVO) => {
    return await request.post({ url: `/business/user-building-consult/create`, data })
  },

  // 修改用户楼盘咨询
  updateUserBuildingConsult: async (data: UserBuildingConsultVO) => {
    return await request.put({ url: `/business/user-building-consult/update`, data })
  },

  // 删除用户楼盘咨询
  deleteUserBuildingConsult: async (id: number) => {
    return await request.delete({ url: `/business/user-building-consult/delete?id=` + id })
  },

  // 导出用户楼盘咨询 Excel
  exportUserBuildingConsult: async (params) => {
    return await request.download({ url: `/business/user-building-consult/export-excel`, params })
  },
}